home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / MPI_Win.z / MPI_Win
Encoding:
Text File  |  2002-10-03  |  15.6 KB  |  331 lines

  1.  
  2.  
  3.  
  4. MMMMPPPPIIII____WWWWiiiinnnn((((3333))))                                                          MMMMPPPPIIII____WWWWiiiinnnn((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      MMMMPPPPIIII____WWWWiiiinnnn - Manipulates a memory region for one-sided communication
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      C:
  13.  
  14.           #include "mpi.h"
  15.  
  16.           int MPI_Win_create(void, *_b_a_s_e, MPI_Aint _s_i_z_e, int _d_i_s_p__u_n_i_t,
  17.           MPI_Info _i_n_f_o, MPI_Comm _c_o_m_m, MPI_Win *_w_i_n);
  18.  
  19.           int MPI_Win_fence(int _a_s_s_e_r_t, MPI_Win _w_i_n);
  20.  
  21.           int MPI_Win_free(MPI_Win *_w_i_n);
  22.  
  23.           int MPI_Get(void *_o_r_i_g_i_n__a_d_d_r, int _o_r_i_g_i_n__c_o_u_n_t,
  24.           MPI_Datatype _o_r_i_g_i_n__d_a_t_a_t_y_p_e, int _t_a_r_g_e_t__r_a_n_k,
  25.           MPI_Aint _t_a_r_g_e_t__d_i_s_p, int _t_a_r_g_e_t__c_o_u_n_t,
  26.           MPI_Datatype _t_a_r_g_e_t__d_a_t_a_t_y_p_e, MPI_Win _w_i_n);
  27.  
  28.           int MPI_Put(void *_o_r_i_g_i_n__a_d_d_r, int _o_r_i_g_i_n__c_o_u_n_t,
  29.           MPI_Datatype _o_r_i_g_i_n__d_a_t_a_t_y_p_e, int _t_a_r_g_e_t__r_a_n_k,
  30.           MPI_Aint _t_a_r_g_e_t__d_i_s_p, int _t_a_r_g_e_t__c_o_u_n_t,
  31.           MPI_Datatype _t_a_r_g_e_t__d_a_t_a_t_y_p_e, MPI_Win _w_i_n);
  32.  
  33.  
  34.      Fortran:
  35.  
  36.           INCLUDE "mpif.h" (or USE MPI)
  37.  
  38.           INTEGER(KIND=MPI_ADDRESS_KIND) _s_i_z_e
  39.           INTEGER _d_i_s_p__u_n_i_t, _i_n_f_o, _c_o_m_m, _w_i_n, _i_e_r_r_o_r
  40.           CALL MPI_WIN_CREATE(_b_a_s_e, _s_i_z_e, _d_i_s_p__u_n_i_t, _i_n_f_o,
  41.           _c_o_m_m, _w_i_n, _i_e_r_r_o_r)
  42.  
  43.           INTEGER _a_s_s_e_r_t, _w_i_n, _i_e_r_r_o_r
  44.           CALL MPI_WIN_FENCE(_a_s_s_e_r_t, _w_i_n, _i_e_r_r_o_r)
  45.  
  46.           INTEGER _w_i_n, _i_e_r_r_o_r
  47.           CALL MPI_WIN_FREE(_w_i_n, _i_e_r_r_o_r)
  48.  
  49.           INTEGER(KIND=MPI_ADDRESS_KIND) _t_a_r_g_e_t__d_i_s_p
  50.           INTEGER _o_r_i_g_i_n__c_o_u_n_t, _o_r_i_g_i_n__d_a_t_a_t_y_p_e, _t_a_r_g_e_t__r_a_n_k,
  51.           _t_a_r_g_e_t__c_o_u_n_t, _t_a_r_g_e_t__d_a_t_a_t_y_p_e, _w_i_n, _i_e_r_r_o_r
  52.           <type> _o_r_i_g_i_n__a_d_d_r(*)
  53.           CALL MPI_GET(_o_r_i_g_i_n__a_d_d_r, _o_r_i_g_i_n__c_o_u_n_t, _o_r_i_g_i_n__d_a_t_a_t_y_p_e,
  54.           _t_a_r_g_e_t__r_a_n_k, _t_a_r_g_e_t__d_i_s_p, _t_a_r_g_e_t__c_o_u_n_t,
  55.           _t_a_r_g_e_t__d_a_t_a_t_y_p_e, _w_i_n, _i_e_r_r_o_r)
  56.  
  57.           INTEGER(KIND=MPI_ADDRESS_KIND) _t_a_r_g_e_t__d_i_s_p
  58.           INTEGER _o_r_i_g_i_n__c_o_u_n_t, _o_r_i_g_i_n__d_a_t_a_t_y_p_e, _t_a_r_g_e_t__r_a_n_k,
  59.           _t_a_r_g_e_t__c_o_u_n_t, _t_a_r_g_e_t__d_a_t_a_t_y_p_e, _w_i_n, _i_e_r_r_o_r
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MMMMPPPPIIII____WWWWiiiinnnn((((3333))))                                                          MMMMPPPPIIII____WWWWiiiinnnn((((3333))))
  71.  
  72.  
  73.  
  74.           <type> _o_r_i_g_i_n__a_d_d_r(*)
  75.           CALL MPI_PUT(_o_r_i_g_i_n__a_d_d_r, _o_r_i_g_i_n__c_o_u_n_t, _o_r_i_g_i_n__d_a_t_a_t_y_p_e,
  76.           _t_a_r_g_e_t__r_a_n_k, _t_a_r_g_e_t__d_i_s_p, _t_a_r_g_e_t__c_o_u_n_t,
  77.           _t_a_r_g_e_t__d_a_t_a_t_y_p_e, _w_i_n, _i_e_r_r_o_r)
  78.  
  79.  
  80. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  81.      IRIX ABI 64 programs only
  82.  
  83.  
  84. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  85.      The following MMMMPPPPIIII____WWWWiiiinnnn routines manipulate a memory region for one-sided
  86.      communication.  MPI one-sided communication is also known as remote
  87.      memory access (RMA).
  88.  
  89.      MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee
  90.                A collective routine that sets up a memory region, or window,
  91.                to be the target of MPI one-sided communication.
  92.                MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee accepts the following arguments:
  93.  
  94.                _b_a_s_e Specifies the starting address of the local window.
  95.  
  96.                _s_i_z_e Specifies the size of the window in bytes.
  97.  
  98.                _d_i_s_p__u_n_i_t
  99.                     Specifies the local unit size for displacements, in bytes.
  100.                     Common choices for _d_i_s_p__u_n_i_t are 1, indicating no scaling,
  101.                     and (in C syntax) ssssiiiizzzzeeeeooooffff(_t_y_p_e), indicating a window that
  102.                     consists of an array of elements of type _t_y_p_e.  The latter
  103.                     choice allows the use of array indices in one-sided
  104.                     communications calls, and has those indices scaled
  105.                     correctly to byte displacements.  Fortran users can use
  106.                     MMMMPPPPIIII____TTTTYYYYPPPPEEEE____EEEEXXXXTTTTEEEENNNNTTTT or the KKKKIIIINNNNDDDD intrinsic function to get the
  107.                     byte size of basic MPI datatypes.
  108.  
  109.                _i_n_f_o Specifies the information object handle or MMMMPPPPIIII____IIIINNNNFFFFOOOO____NNNNUUUULLLLLLLL.
  110.                     Currently, this argument is ignored.
  111.  
  112.                _c_o_m_m Specifies the communicator that defines the group of
  113.                     processes to be associated with this set of windows.
  114.  
  115.                _w_i_n  Specifies the window handle returned by this call.
  116.  
  117.                _i_e_r_r_o_r
  118.                     Specifies the return code value for successful completion,
  119.                     which is in MPI_SUCCESS.  MPI_SUCCESS is defined in the
  120.                     mmmmppppiiiiffff....hhhh file.
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. MMMMPPPPIIII____WWWWiiiinnnn((((3333))))                                                          MMMMPPPPIIII____WWWWiiiinnnn((((3333))))
  137.  
  138.  
  139.  
  140.      MMMMPPPPIIII____WWWWiiiinnnn____ffffeeeennnncccceeee
  141.                Waits for completion of locally issued RMA operations and
  142.                performs a barrier synchronization of all processes in the
  143.                group of the specified RMA window.  MMMMPPPPIIII____WWWWiiiinnnn____ffffeeeennnncccceeee accepts the
  144.                following arguments:
  145.  
  146.                _w_i_n  Specifies the window object (handle).
  147.  
  148.                _a_s_s_e_r_t
  149.                     Provides assertions on the context of the call.  This
  150.                     argument can be used for various optimizations. A value of
  151.                     _a_s_s_e_r_t ==== 0000 iiiissss aaaallllwwwwaaaayyyyssss vvvvaaaalllliiiidddd....
  152.  
  153.  
  154.  
  155.      MMMMPPPPIIII____WWWWiiiinnnn____ffffrrrreeeeeeee
  156.                Deletes an RMA window object.  MMMMPPPPIIII____WWWWiiiinnnn____ffffrrrreeeeeeee accepts the
  157.                following argument:
  158.  
  159.                _w_i_n  Specifies the window object (handle).
  160.  
  161.  
  162.  
  163.      MMMMPPPPIIII____GGGGeeeetttt   Transfers data from an RMA window on a specified target process
  164.                to a buffer on the origin process.  The origin process is the
  165.                process that makes the RMA call.  MMMMPPPPIIII____GGGGeeeetttt accepts the following
  166.                arguments:
  167.  
  168.                _o_r_i_g_i_n__a_d_d_r
  169.                     Specifies the initial address of the buffer on the origin
  170.                     process into which the data will be transferred.
  171.                     (choice).
  172.  
  173.                _o_r_i_g_i_n__c_o_u_n_t
  174.                     Specifies the number of entries in the origin buffer
  175.                     (nonnegative integer).
  176.  
  177.                _o_r_i_g_i_n__d_a_t_a_t_y_p_e
  178.                     Specifies the datatype of each entry in the origin buffer
  179.                     (handle).
  180.  
  181.                _t_a_r_g_e_t__r_a_n_k
  182.                     Specifies the rank of the target (nonnegative integer).
  183.  
  184.                _t_a_r_g_e_t__d_i_s_p
  185.                     Specifies the displacement from start of window to target
  186.                     buffer (nonnegative integer).  The target buffer is the
  187.                     location in the target process window from which the data
  188.                     will be copied.  The displacement unit is defined by
  189.                     MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. MMMMPPPPIIII____WWWWiiiinnnn((((3333))))                                                          MMMMPPPPIIII____WWWWiiiinnnn((((3333))))
  203.  
  204.  
  205.  
  206.                _t_a_r_g_e_t__c_o_u_n_t
  207.                     Specifies the number of entries in the target buffer
  208.                     (nonnegative integer).  _t_a_r_g_e_t__d_a_t_a_t_y_p_e Specifies the
  209.                     datatype of each entry in the target buffer (handle).
  210.  
  211.                _w_i_n  Specifies the window object used for communication
  212.                     (handle).
  213.  
  214.  
  215.  
  216.      MMMMPPPPIIII____PPPPuuuutttt   Transfers data from a buffer on the origin process into an RMA
  217.                window on a specified target process. MMMMPPPPIIII____PPPPuuuutttt accepts the
  218.                following arguments:
  219.  
  220.                _o_r_i_g_i_n__a_d_d_r
  221.                     Specifies the initial address of the buffer on the origin
  222.                     process from which the data will be transferred.
  223.                     (choice).
  224.  
  225.                _o_r_i_g_i_n__c_o_u_n_t
  226.                     Specifies the number of entries in the origin buffer
  227.                     (nonnegative integer).
  228.  
  229.                _o_r_i_g_i_n__d_a_t_a_t_y_p_e
  230.                     Specifies the datatype of each entry in the origin buffer
  231.                     (handle).
  232.  
  233.                _t_a_r_g_e_t__r_a_n_k
  234.                     Specifies the rank of the target (nonnegative integer).
  235.  
  236.                _t_a_r_g_e_t__d_i_s_p
  237.                     Specifies the displacement from start of window to target
  238.                     buffer (nonnegative integer).  The target buffer is the
  239.                     location in the target process window into which the data
  240.                     will be copied.  The displacement unit is defined by
  241.                     MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee.
  242.  
  243.                _t_a_r_g_e_t__c_o_u_n_t
  244.                     Specifies the number of entries in the target buffer
  245.                     (nonnegative integer).
  246.  
  247.                _t_a_r_g_e_t__d_a_t_a_t_y_p_e
  248.                     Specifies the datatype of each entry in the target buffer
  249.                     (handle).
  250.  
  251.                _w_i_n  Specifies the window object used for communication
  252.                     (handle).
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. MMMMPPPPIIII____WWWWiiiinnnn((((3333))))                                                          MMMMPPPPIIII____WWWWiiiinnnn((((3333))))
  269.  
  270.  
  271.  
  272.      After a call to MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee, any process in the group can issue
  273.      MMMMPPPPIIII____PPPPuuuutttt or MMMMPPPPIIII____GGGGeeeetttt requests to any part of these memory regions, subject
  274.      to the constraints for conflicting accesses outlined in the MPI-2
  275.      standard.
  276.  
  277.      The current IRIX implementation of one-sided communication has the
  278.      following limitations:
  279.  
  280.      *   The communicator must reside completely on a single host.
  281.  
  282.      *   The memory window must be in a remotely accessible memory region. The
  283.          following types of memory qualify:
  284.  
  285.        - Static memory (C)
  286.  
  287.        - Arrays within common blocks (Fortran)
  288.  
  289.        - Save variables and arrays (Fortran)
  290.  
  291.        - Symmetric heap (allocated with sssshhhhmmmmaaaalllllllloooocccc or SSSSHHHHPPPPAAAALLLLLLLLOOOOCCCC)
  292.  
  293.        - Global heap (allocated with the Fortran 90 AAAALLLLLLLLOOOOCCCCAAAATTTTEEEE command and
  294.          MIPSpro 7.3.1 lm or later and the SSSSMMMMAAAA____GGGGLLLLOOOOBBBBAAAALLLL____AAAALLLLLLLLOOOOCCCC environment
  295.          variable set to any value.
  296.  
  297.      *   The ddddiiiisssspppp____uuuunnnniiiitttt value passed to MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee must be the same on all
  298.          processes.
  299.  
  300.      *   The data type passed to MMMMPPPPIIII____PPPPuuuutttt or MMMMPPPPIIII____GGGGeeeetttt must have contiguous
  301.          storage.
  302.  
  303.      *   Currently, the only supported RMA functions are MMMMPPPPIIII____WWWWiiiinnnn____ccccrrrreeeeaaaatttteeee,
  304.          MMMMPPPPIIII____WWWWiiiinnnn____ffffrrrreeeeeeee, MMMMPPPPIIII____PPPPuuuutttt, MMMMPPPPIIII____GGGGeeeetttt, and MMMMPPPPIIII____WWWWiiiinnnn____ffffeeeennnncccceeee.  The MMMMPPPPIIII____PPPPuuuutttt,
  305.          MMMMPPPPIIII____GGGGeeeetttt, and MMMMPPPPIIII____WWWWiiiinnnn____ffffeeeennnncccceeee functions provide the tools needed to code
  306.          a "compute-synchronize-communicate-synchronize" sequence strategy for
  307.          parallel programming.  Note that the MMMMPPPPIIII____WWWWiiiinnnn____ffffeeeennnncccceeee function is
  308.          essentially a barrier synchronization function.
  309.  
  310. NNNNOOOOTTTTEEEESSSS
  311.      Use of MMMMPPPPIIII____PPPPuuuutttt and MMMMPPPPIIII____GGGGeeeetttt in Fortran programs requires that you compile
  312.      with the ----LLLLAAAANNNNGGGG::::rrrreeeeccccuuuurrrrssssiiiivvvveeee====oooonnnn option on the ffff77777777 or ffff99990000 command line when
  313.      RMA windows are created in SAVE arrays that are not in common blocks.  We
  314.      recommend that, to be safe, you always specify ----LLLLAAAANNNNGGGG::::rrrreeeeccccuuuurrrrssssiiiivvvveeee====oooonnnn.
  315.  
  316. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  317.      MMMMPPPPIIII(1)
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.